<%@page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Insert title here</title>
<style>
table,tr,td{
 border:1px solid pink;
}
</style>
</head>
<body>
<form action="HotelServlet?req=selectAll" align="center" method="post">
	房间号：<input type="text" name="hotel" value="${hotel }"/>
	<button type="submit">查询</button>
</form>



<table align="center" >
	<thead>
	
	
		<tr style="background-color: #ADFF2F" align="center">
			<td>房间编号</td>
			<td>房间类型</td>
			<td>房间单价</td>
			<td>优惠价格</td>
			<td>房间状态</td>
			<td>备注</td>
			<td>操作</td>
		</tr>
	</thead>
	<tbody>
		<c:choose>
			<c:when test="${empty  alist }">
				<tr align="center">
				    <td colspan="8" align="center">没有数据</td>
				</tr>
			</c:when>
			<c:otherwise>
			<c:forEach items="${alist }" var="u">
			<tr align="center">
				<td>${u.hotel }</td> 
				<td>${u.hotelType }</td>
				<td>${u.price }</td>
				<td>${u.discountPrice }</td>
				<td>${u.hotelState }</td>
				<td>${u.remark }</td>
				<td>
				<a href="HotelServlet?req=userDetail&id=${u.hotelId}" type="button">详情</a>
				</td>
			</tr>
		</c:forEach>
			</c:otherwise>
		</c:choose>
	
	
	</tbody>
	</table>
	</script>
</body>
</html>